c59f3f97fe0e3421181dd6c10f8062e3ad337001,src/main/java/eu/mihosoft/jcsg/playground/Main.java,Main,testCut,#,439
Before Change
int cubePolyFrom = 0;
int cubePolyTo = 6;
List<Polygon> cubePolys = cube.getPolygons().subList(cubePolyFrom, cubePolyTo);
List<RayIntersection> intersections =
getPolygonsThatIntersectWithRay(p.centroid(), p.plane.getNormal(), cubePolys, EPS);
After Change
CSG cube = new Cube(Vector3d.xyz(1,1,1), Vector3d.xyz(2, 2, 2)).toCSG()
.transformed(Transform.unity().rot(Vector3d.ZERO, Vector3d.UNITY, 17));
cube = new Sphere(Vector3d.x(0.), 0.5, 16, 16).toCSG();
// CSG cube = new Cube(1).toCSG().transformed(
// Transform.unity().translate(0.5,-0.55,0.5).rot(Vector3d.ZERO, Vector3d.UNITY, 0)
// );
int cubePolyFrom = 0;
int cubePolyTo = 6;
List<Polygon> cubePolys = cube.getPolygons();//.subList(cubePolyFrom, cubePolyTo);
System.out.println("p: " + p.toStlString());
System.out.println("p-centroid: " + p.centroid());